import { Inject, Get } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { ContentTileService } from '../../service/tile';
import { ContentTileEntity } from '../../entity/tile';

@CoolController({
    api: ['list'],
    service: ContentTileService,
    entity: ContentTileEntity,
})
export class ProviderContentTileController extends BaseController {
    @Inject()
    contentTileService: ContentTileService;

    @Get('/list', { summary: '获取瓷片区列表' })
    async list() {
        return this.ok(await this.contentTileService.listOpen());
    }
}

